package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacManagerDao;
import com.woniuxy.entity.JsonUser;
import com.woniuxy.entity.RbacManagerEntity;
import com.woniuxy.service.RbacManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ideaAdmin
 * TODO:
 * Date: 2022/2/14:18:42
 * Description:
 */
@Service
public class RbacManagerServiceImpl implements RbacManagerService {

    @Autowired(required = false)
    RbacManagerDao rbacManagerDto;

    @Override
    public List<RbacManagerEntity> findAll() {
        List<RbacManagerEntity> list =  rbacManagerDto.findAll();
        return list;
    }

    @Override
    public Boolean addManager(RbacManagerEntity rbacManagerEntity) {

        return  rbacManagerDto.addManager(rbacManagerEntity) > 0;
    }

    @Override
    public boolean addJson(JsonUser jsonUser) {
        return rbacManagerDto.addJson(jsonUser) > 0;
    }

    @Override
    public List<JsonUser> findById() {
        return rbacManagerDto.findById();
    }
}
